<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.domain.ZhongLei,java.util.ArrayList,com.domain.*"%>

<%
YongHu yonghu=(YongHu)session.getAttribute("yonghu");

	
ArrayList<ShangPin> dingdanxiangqing=(ArrayList<ShangPin>)session.getAttribute("dingdanxiangqing");
ShangPin shangpin;

if(yonghu==null || !yonghu.getQuanxian().equals("guanliyuan"))
{
	request.getRequestDispatcher("guanliyuandenglu.jsp").forward(request, response);
}
if(dingdanxiangqing==null)
{
	request.getRequestDispatcher("houtaidingdan.jsp").forward(request, response);
}
%>

<html>
	<head>
		<style>A{text-decoration: NONE} </style>
		<title>订单详情</title>
	</head>
	<body >
	<table width="100%" align="center"  bgcolor="#d0eed8" border="1">
		<tr height="200">
			<td align="center"><font size="7"><a href="houtaishouye.jsp">返回首页</a></font></td>			
		</tr>
		<tr height="200">
			<td align="center"><font size="7"><a href="houtaidingdan.jsp">返回订单列表</a></font></td>			
		</tr>
	</table>

	

	<table align="center" width="100%" bgcolor="#d0eed8" border="1">	
	
		<colgroup width="20%" span="5">
		<tr>
			<th>图片</th>
			<th>名字</th>
			<th>价格</th>
			<th>数量</th>
			<th>金额</th>
		</tr>
	</table>	 
	
	
	
<%
		for(int i=dingdanxiangqing.size()-1;i>=0;i--)
		{
			shangpin=dingdanxiangqing.get(i);			
%>
				<table align="center" width="100%" bgcolor="#d0eed8" cellspacing="10" border="1">	
					<colgroup width="20%" span="5">
					<tr align="center">
<%
					if(shangpin.getTupian().size()==0)
					{
%>
						<td>商品已下架</td>
<%
}
					else
					{
%>
						<td><img src="./images/<%=shangpin.getTupian().get(0) %>.jpg" width="100%"></td>
<%
					}
%>
						<td><%=shangpin.getMingzi() %></td>
						<td><%=shangpin.getJiage() %></td>
						<td><%=shangpin.getShuliang() %></td>
						<td><%=shangpin.getJiage()*shangpin.getShuliang() %></td>
					</tr>
				</table>	
			
<%					
			
		}
%>			

		
  </body>
</html>
